package com.actions;

import java.util.List;

import net.sf.json.JSONArray;

import com.bean.ApplicablePart;
import com.opensymphony.xwork2.ActionSupport;
import com.serviceImpl.ApplicablePartServiceImpl;

public class ApplicablePartAction extends ActionSupport {

	private ApplicablePartServiceImpl applicablePartBiz;
	private List<ApplicablePart> allApplicablePart;
	private JSONArray applicablePartJson;
	
	public ApplicablePartServiceImpl getApplicablePartBiz() {
		return applicablePartBiz;
	}

	public void setApplicablePartBiz(ApplicablePartServiceImpl applicablePartBiz) {
		this.applicablePartBiz = applicablePartBiz;
	}
	
	public List<ApplicablePart> getAllApplicablePart() {
		return allApplicablePart;
	}

	public void setAllApplicablePart(List<ApplicablePart> allApplicablePart) {
		this.allApplicablePart = allApplicablePart;
	}

	public JSONArray getApplicablePartJson() {
		return applicablePartJson;
	}

	public void setApplicablePartJson(JSONArray applicablePartJson) {
		this.applicablePartJson = applicablePartJson;
	}

	public String loadAllApartList(){
		allApplicablePart = applicablePartBiz.getAllApplicablePart();
		applicablePartJson = JSONArray.fromObject(allApplicablePart);
		return "loadApart";
	}
}
